package com.gitee.swsk33.catentity.model;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@Setter
@Getter
public class Result<T> implements Serializable {

	private boolean success;

	private String message;

	private T data;

	public void setResultSuccess(String message) {
		success = true;
		this.message = message;
		this.data = null;
	}

	public void setResultSuccess(String message, T data) {
		success = true;
		this.message = message;
		this.data = data;
	}

	public void setResultFailed(String message) {
		success = false;
		this.message = message;
		this.data = null;
	}

}